package cn.sm1234.user.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户Controller
 */
@RestController
@RequestMapping("/client")
public class clientController {

    @Autowired
    private UserController userController;

    /**
     * 根据id查询用户
     */
    @GetMapping(value = "/user/{id}")
    public String findById(@PathVariable(value = "id") Integer id) {
        String user = userController.findById(id);
        return user;
    };

    /**
     * 根据id查询用户
     */
    @GetMapping(value = "/test")
    public String test() {
        return "test";
    };
    /**
     * 根据id查询用户
     */
    @GetMapping(value = "test1")
    public String test1() {
        return "test1";
    };
}
